/*
 * Detector.hh
 *
 *  Created on: 14.04.2011
 *      Author: ed
 */

#ifndef DETECTOR_HH_
#define DETECTOR_HH_
#include "G4VUserDetectorConstruction.hh"
#include "IExperimentalVolume.hh"
#include "TrackerSD.hh"
#include "PrimariesGenerator.hh"
class TrackerSD;
class Detector : public G4VUserDetectorConstruction,public IExperimentalVolume
{
public:
	Detector(G4double R, G4double LAbs, G4double LSc);
	virtual ~Detector();
	G4VPhysicalVolume* Construct();
	void SetLAbs(G4double LAbs);
	void SetLSc(G4double LSc);
	inline TrackerSD* GetTrackerSD(){return trackerSD;}
	inline G4int GetLightOutput();
	inline G4int GetParticlesPerEvent();
	inline G4double GetLightCollection(){return (double)trackerSD->GetLightOutput()/(double)PrimariesGenerator::GetNParticlesPerEvent();}
private:
	Detector();
	G4double r,boxSide;
	G4VPhysicalVolume *airBoxPhys, *aerogelSpherePhys;
	G4double* PhotonEnergy;
	TrackerSD* trackerSD;
	static const G4int nEntries = 5;

};

#endif /* DETECTOR_HH_ */
